package com.maxd.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 活动记录表
 */
@ApiModel("活动记录表")
@Entity
@Getter
@Setter
@Table(name = "activity_join_record")
@DynamicInsert
@DynamicUpdate
public class ActivityJoinRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @ApiModelProperty("自增主键")
    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 交易流水号
     */
    @ApiModelProperty("交易流水号")
    @Column(name = "trans_id", nullable = false)
    private String transId;

    /**
     * 用户id
     */
    @ApiModelProperty("用户id")
    @Column(name = "user_id", nullable = false)
    private Long userId;

    /**
     * 下单用户手机号
     */
    @ApiModelProperty("下单用户手机号")
    @Column(name = "user_phone")
    private String userPhone;

    /**
     * 参加人姓名
     */
    @ApiModelProperty("参加人姓名")
    @Column(name = "join_name")
    private String joinName;

    /**
     * 参加人联系电话
     */
    @ApiModelProperty("参加人联系电话")
    @Column(name = "join_phone")
    private String joinPhone;

    /**
     * 活动ID
     */
    @ApiModelProperty("活动ID")
    @Column(name = "activity_id", nullable = false)
    private Long activityId;

    /**
     * 活动名称
     */
    @ApiModelProperty("活动名称")
    @Column(name = "activity_name")
    private String activityName;

    /**
     * price
     */
    @ApiModelProperty("单价")
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 人数
     */
    @ApiModelProperty("人数")
    @Column(name = "num")
    private Integer num;

    /**
     * 金额
     */
    @ApiModelProperty("金额")
    @Column(name = "amount")
    private BigDecimal amount;

    /**
     * 记录状态 0-初始化 1-付款中 2-完成 3-取消
     */
    @ApiModelProperty("记录状态 0-初始化 1-付款中 2-完成 3-取消")
    @Column(name = "status", nullable = false)
    private String status;

    /**
     * 支付流水号
     */
    @ApiModelProperty("支付流水号")
    @Column(name = "pay_seq", nullable = true)
    private String paySeq;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @Column(name = "update_time", nullable = false)
    private Date updateTime;

    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    @Column(name = "create_by")
    private String createBy;

    /**
     * 更新人
     */
    @ApiModelProperty("更新人")
    @Column(name = "update_by")
    private String updateBy;

}
